<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  

  <script type="text/javascript">
    
  var arr = [['a', 1], ['b', 10], ['c', 100], ['d', 1000]];
  var obj = {};
  // 嵌套数组转对象
// 答案 { 'a': 1, 'b': 2 }  

      for(let i = 0; i<arr.length;i++){
        var arr1 = arr[i]
        for(let j = 0 ; j<arr1.length; j++){
          obj[arr1[0]] = arr1[1]
        }        
      }
    console.log(obj)
  </script>
</body>
</html>